$(function() {

//开头音乐标记//
// $('.kp1').click(function(){
// 	
// 	$('header').addClass('jsmusic')
//    alert(11)  
// 
// 	
// })

//-----------------尾部链接------------------//




$('.kli4').mouseenter(function(){

$('.kimg').css('display','block')

})

$('.kli4').mouseleave(function(){

$('.kimg').css('display','none')

})

$('.kimg').mouseenter(function(){

$(this).css('display','block')

})


$('.kimg').mouseleave(function(){

$(this).css('display','none')

})

//--------------------------//
//--------------加载更多资源-----------------------//

$('.addmore>center').click(function(){
	
   
   $('article').append(`<article>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">





				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>《原神》「启程测试」充值返还规则说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright">公告</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10414'">
			
				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>「原素烘炉」多人游戏挑战活动玩法说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
			
				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>《原神》App Store Today 推荐 - 「技术宅拯救世界！」</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/8471'">
			
				<img src="https://uploadstatic.mihoyo.com/contentweb/20201010/2020101019560593208.jpg" class="coverFit">
				<span>10月11日原素烘炉活动说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10203'">
			

				<img src="https://uploadstatic.mihoyo.com/contentweb/20201011/2020101101461049573.jpg" class="coverFit">
				<span>《原神》近期游戏内描述等问题修复调整说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>

		</article>`)
   
    $('body').css('background-position-y','bottom')
    $('body').css('background-repeat','no-repeat')


})

//-----------------------------------------------//

//------------------选项卡-----------------------------//



$('nav>ul>li:first-child').click(function(){
	

	$('article').html('')
	$('article').append(`<article>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10203'">





				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>《原神》「启程测试」充值返还规则说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright">公告</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/8471'">
				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>「原素烘炉」多人游戏挑战活动玩法说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
				<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
				<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
				<span>《原神》App Store Today 推荐 - 「技术宅拯救世界！」</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
			<div onclick="location='https://ys.mihoyo.com/main/news/detail/10414'">
				<img src="https://uploadstatic.mihoyo.com/contentweb/20201010/2020101019560593208.jpg" class="coverFit">
				<span>10月11日原素烘炉活动说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">

				<img src="https://uploadstatic.mihoyo.com/contentweb/20201011/2020101101461049573.jpg" class="coverFit">
				<span>《原神》近期游戏内描述等问题修复调整说明</span>
				<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
			</div>

		</article>`)
	})
	
	
	
	
$('nav>ul>li').eq(1).click(function(){
	
	
	$('article').html('')
		$('article').append(
		
		`<article>
		
		
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">
			<img src="https://uploadstatic.mihoyo.com/contentweb/20201010/2020101019560593208.jpg" class="coverFit">
			<span>10月11日原素烘炉活动说明</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
		</div>
				
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10414'">
						<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
						<span>「原素烘炉」多人游戏挑战活动玩法说明</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10203'">
						<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
						<span>《原神》App Store Today 推荐 - 「技术宅拯救世界！」</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
				
						<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
							
						<img src="https://uploadstatic.mihoyo.com/contentweb/20201011/2020101101461049573.jpg" class="coverFit">
						<span>《原神》近期游戏内描述等问题修复调整说明</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
		
		<div>
				
				
				
				
				
			<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
			<span>《原神》「启程测试」充值返还规则说明</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright">公告</span></div>
		</div>
		
		
		
				</article>`
		
		
		
		
		)
	
	})
	
	$('nav>ul>li').eq(2).click(function(){
		
		
		$('article').html('')
		$('article').append(
		
		`<article>
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">
			<img src="img/kpp1.jpg" width="265px" height="140px" class="coverFit">
			<span>12月11新的角色出演，龙神觉醒</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
		</div>
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
							
						<img src="https://uploadstatic.mihoyo.com/contentweb/20201011/2020101101461049573.jpg" class="coverFit">
						<span>《原神》近期游戏内描述等问题修复调整说明</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
				<div onclick="location='https://ys.mihoyo.com/main/news/detail/10414'">
						<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
						<span>「原素烘炉」多人游戏挑战活动玩法说明</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
						<div onclick="location='https://ys.mihoyo.com/main/news/detail/10203'">
						<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
						<span>《原神》App Store Today 推荐 - 「技术宅拯救世界！」</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
				
					
		
		<div>
				
				
				
				
				
			<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
			<span>《原神》「启程测试」充值返还规则说明</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright">公告</span></div>
		</div>
		
		
		
				</article>`
		
		
		
		)
			
			
			
			
		
		})
	
	$('nav>ul>li').eq(3).click(function(){
		
		
		$('article').html('')
			$('article').append(`<article>
			<div>
			<img src="img/kpp2.jpg" width="265px" height="140px" class="coverFit">
			<span>首充1元，获得永久大礼包宠物，限时28天！</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
		</div>
					
					
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
						<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
						<span>《原神》App Store Today 推荐 - 「技术宅拯救世界！」</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
				
					<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">
							
						<img src="https://uploadstatic.mihoyo.com/contentweb/20201011/2020101101461049573.jpg" class="coverFit">
						<span>《原神》近期游戏内描述等问题修复调整说明</span>
						<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
					</div>
		<div onclick="location='https://ys.mihoyo.com/main/news/detail/10118'">
			<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
			<span>「原素烘炉」多人游戏挑战活动玩法说明</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright2">新闻</span></div>
		</div>
		<div onclick="location='https://ys.mihoyo.com/main/news/detail/10604'">
				
				
				
				
				
			<img src="https://ys.mihoyo.com/main/_nuxt/img/37207c1.jpg" class="coverFit">
			<span>《原神》「启程测试」充值返还规则说明</span>
			<div class="textbox">2020/09/15 &nbsp;&nbsp;&nbsp;&nbsp; <span class="textright">公告</span></div>
		</div>
		
		
		
				</article>`)
	

})

//---------------------------标头音乐-----------------//
$('.kp1').click(function(){
	
	$('header').toggleClass('tabp')
	
//-------------音乐添加位置------------//	
	$(this).append(`<audio>
	
	
	</audio>`)
	
	
})

//------------缓慢上去----------------------//

$('.arrow').click(function(){
	    $('html,body').animate({
	      scrollTop:$('#top').offset().top
	    }, 1000);}); 


//---------------------卷轴消失----------------//


$(window).scroll(function(){

var top = $(window).scrollTop();
console.log(top)
if(top > 800){

$('.arrow').css('display','block')

}

else{$('.arrow').css('display','none')}

})

//----------登录窗口点击触发影登录串口窗口---------//
  
$('.kfix1').click(function(){
	
	alert("js343行添加点击弹出登录窗口")
})





$('.kp1').click(function(){
	
	alert("js353行添加点击增加音乐")
	
//-------------音乐添加位置------------//	
	// $(this).append(`<audio>
	// 
	// 
	// </audio>`)
	// 
	
})


	})




      







